import re
content = 'http://www.baidu.com'
abc = re.compile('http://www.(.*?).com', re.S)

myvalue = re.findall(abc, content)
print(myvalue)